<%@page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html class="root61">
<head>
<%@include file="/views/common/include/taglib.jsp"%>
<%@include file="/views/common/include/head.jsp"%>
<link type="text/css" rel="stylesheet"
	href="${ctx }/css/dlifestyle/sectionparent.css" source="widget" />
<link type="text/css" rel="stylesheet"
	href="${ctx }/css/dlifestyle/admin.css" source="widget" />
</head>
<style>
</style>
<body style="margin: 0px;">
	<section class="mainborder">
		<section class="edit_scrollable padder">
			<%--          <div class="edit_header">
            <h3 class="memu_name">
           		<c:if test="${type == 2 }">编辑地区</c:if>
           		<c:if test="${type == 1 }">新增地区</c:if>
            </h3>
         </div> --%>
			<div class="edit_content">
				<form id="myFrom">
					<div class="form">
						<div class="item">
							<label class="col-sm-1 editlable">商品分类名称：</label>
							<div class="fl">
								<input class="editform-control" id="name" value="${goodsCategory.name}" type="text" style="width: 230px;" maxlength="20" class="text" placeholder="请输入商品分类名称（最多20字）"> 
								<em class="emStyle">*</em>
							</div>
						</div>
						<div class="item">
							<label class="col-sm-1 editlable">分类描述：</label>
							<div class="fl">
								<input class="editform-control" id="descrip"
									value="${goodsCategory.descrip}" type="text" style="width: 230px;" maxlength="200"
									class="text" placeholder="请输入分类描述（最多200字）"> <em
									class="emStyle">*</em>
							</div>
						</div>
						<input id="level" type="hidden" value="${goodsCategory.level }">
						<input id="eParentId" type="hidden"
							value="${goodsCategory.parentId }"> <input
							id="categoryId" type="hidden" value="${goodsCategory.id }">
						<div class="item">
							<label class="col-sm-1 editlable">分类等级：</label>
							<div class="fl">
                                <c:if test="${type == 1 }">
                                    <select id="editLevel" class="editform-control"
                                        style="height: 29px; width: 120px;">
                                        <option value="1" selected="selected">一级</option>
                                        <option value="2" >二级</option>
                                    </select>
                                </c:if>
                                <c:if test="${type == 2 }">
    								<select id="editLevel" class="editform-control"
    									style="height: 29px; width: 120px;">
    									<option value="1"
    										<c:if test="${goodsCategory.level == 1 }">selected="selected"</c:if>>一级</option>
    									<option value="2"
    										<c:if test="${goodsCategory.level == 2 }">selected="selected"</c:if>>二级</option>
    								</select>
                                </c:if>
							</div>
						</div>
                            <div id="parentCategory" class="item" style="margin-bottom: 0px;">
                                <label class="col-sm-1 editlable">上级分类：</label>
                                <div class="fl">
                                    <c:if test="${type == 1 }">
                                        <select class="editform-control"
                                            style="height: 29px; width: 120px;" id="parentId"
                                            name="parentId" required>
                                            <option value="${goodsCategory.parentId }">${gInfo.name}</option>
                                        </select>
                                    </c:if>
                                    <c:if test="${type == 2 }">
                                        <select class="editform-control"
                                            style="height: 29px; width: 120px;" id="parentId"
                                            name="parentId" required>
                                            <c:forEach items="${goodsList }" var="item"
                                                varStatus="itemStatus">
                                                <option value="${item.id }"
                                                    <c:if test="${item.name == gInfo.name}" >selected="selected"</c:if>>${item.name}</option>
                                            </c:forEach>
                                        </select>
                                    </c:if>
                                </div>
                            </div>
						
						<div class="item">
							<label class="col-sm-1 editlable">是否需要配送：</label>
							<div class="fl">
								<fieldset tabindex="0" class='radioGroup'>

									<input id="distribute1" name="distribute" type="radio"
										value="1"
										<c:if test="${goodsCategory.isNeedDistribute == 1 }">checked = "checked"</c:if> />
									<label for="distribute1">是</label> <input id="distribute0"
										name="distribute" type="radio" value="0"
										<c:if test="${goodsCategory.isNeedDistribute == 0 }">checked = "checked"</c:if> />
									<label for="distribute0" style="margin-left: 10px;">否</label>

								</fieldset>
							</div>
						</div>
						<div class="item" style="display: none">
							<label class="col-sm-1 editlable">是否需要平台服务费：</label>
							<div class="fl">
								<fieldset tabindex="0" class='radioGroup'>
									<input id="servicePrice1" name="servicePrice" type="radio"
										value="1"
										<c:if test="${goodsCategory.isServicePrice == 1 }">checked = "checked"</c:if> />
									<label for="servicePrice1" class="">是</label> <input
										id="servicePrice0" name="servicePrice" type="radio" value="0"
										<c:if test="${goodsCategory.isServicePrice == 0 }">checked = "checked"</c:if> />
									<label for="servicePrice0" style="margin-left: 10px;">否</label>
								</fieldset>
							</div>
						</div>
						<div class="item">
							<label class="col-sm-1 editlable">是否需要商家确认：</label>
							<div class="fl">
								<fieldset tabindex="0" class='radioGroup'>
									<input id="confirm1" name="confirm" type="radio" value="1"
										<c:if test="${goodsCategory.isNeedConfrim == 1 }">checked = "checked"</c:if> />
									<label for="confirm1" class="">是</label> <input id="confirm0"
										name="confirm" type="radio" value="0"
										<c:if test="${goodsCategory.isNeedConfrim == 0 }">checked = "checked"</c:if> />
									<label for="confirm0" style="margin-left: 10px;">否</label>
								</fieldset>
							</div>
						</div>
					</div>
				</form>
			</div>
		</section>
	</section>

	<script type="text/javascript">
		document.getElementById("myFrom").reset();
	</script>
</body>
<script
	src="${ctx}/js/controllers/mall/goodsCategory/GoodsCategoryEditController.js"
	type="text/javascript"></script>
<script type="text/javascript">
	var ctx = '${ctx}';
	setCtx(ctx);
</script>
<!-- 解决ie 6 7 8 9不能显示placeholder的问题 -->
<script src="${ctx}/js/lib/jquery.JPlaceholder.js"></script>
</html>
